const user = {
  name: "John Doe",
  age: 30,
  email: "john.doe@example.com",
  address: {
    street: "123 Main St",
    city: "Anytown",
    country: "USA"
    
    
    
  }
};

const numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

const pi = 3.14;
const e = 2.71;
const goldenRatio = 1.618;

const isActive = true;
const userCount = numbers.length;

const userDetails = {
  ...user,
  isActive,
  userCount
};

const favoriteColors = ["red", "green", "blue", "yellow"];

const mixedArray = [user, numbers, pi, favoriteColors];

function logUserDetails(user) {
  console.log(`Name: ${user.name}`);
  console.log(`Age: ${user.age}`);
  console.log(`Email: ${user.email}`);
}

function logNumbers(arr) {
  arr.forEach(num => console.log(num));
}

logUserDetails(user);
logNumbers(numbers);

const sum = numbers.reduce((acc, curr) => acc + curr, 0);
console.log(`Sum of numbers: ${sum}`);

const average = sum / userCount;
console.log(`Average of numbers: ${average}`);

const maxNumber = Math.max(...numbers);
console.log(`Max number: ${maxNumber}`);

const minNumber = Math.min(...numbers);
console.log(`Min number: ${minNumber}`);

const userInfo = {
  user,
  numbers,
  pi,
  e,
  goldenRatio,
  isActive,
  userCount,
  favoriteColors,
  mixedArray
};

console.log(userInfo);